package Corejava.com;

public class LoopDemo {

	public static void main(String[] args) {
		 
        int num = 0;
        // while loop to print out 1 to 10

        while (num < 11) {

               System.out.print(num + ", ");
               num++;
        }
        System.out.println();
       
        // do while loop to print 1 to 10
        int numDo = 0;
        do {
       
               System.out.print(numDo + ", ");
               numDo++;
       
        } while (numDo < 11);
        System.out.println();
        // for each loop thru 1 to 10
       
        int[] numArray = new int[]{1,2,3,4,5,6,7,8,9,10};
       
        for (int i : numArray) {
               System.out.print(i + ", ");
               i++;
        }
        System.out.println();
        
        
			
		
		}
		//System.out.print("|");
        
       
 }

